<template>
  <img alt="Vue logo" src="./assets/logo.png" @click="getList" />
  <RobinIndex msg="梦想还是要有的，万一实现了呢。" />
  <el-button type="primary">Primary</el-button>
</template>

<script>
import { inject } from "vue";

import axios from "axios";


import RobinIndex from "./components/RobinIndex.vue";
export default {
  name: "app",
  components: {
    // HelloWorld,
    RobinIndex,
  },
  setup() {
    const axios = inject("axios");
    const getList = () => {
      axios.post("http://localhost:8081/list").then((response) => {
        console.log(response.data);
      });
    };
    return getList;
  },
  methods: {
    getList() {
      axios.post("http://localhost:8081/list").then((response) => {
        console.log(response.data);
      });
    },
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
